<?php

namespace JLPay\Models\BaseData;

use JLPay\Models\BaseRequest;

/**
 * 银行卡bin信息查询请求
 */
class BankCardBinMatchingRequest extends BaseRequest
{
    /**
     * API接口路径
     */
    public const API_URL = '/open/base/data/bank-cardbin/matching';

    protected ?string $cardNo = null;

    /**
     * 设置银行卡号
     *
     * @param string $cardNo
     * @return self
     */
    public function setCardNo(string $cardNo): self
    {
        $this->cardNo = $cardNo;
        return $this;
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        $data = parent::toArray();
        
        if ($this->cardNo !== null) {
            $data['card_no'] = $this->cardNo;
        }
        
        return $data;
    }
} 